package com.dferreira.repository.data_models;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = FileEntry.TABLE_NAME)
public class FileEntry {

    public static final String TABLE_NAME = "fileEntry";
    public static final String COLUMN_NAME_ID = "id";
    public static final String COLUMN_NAME_PATH = "path";
    public static final String COLUMN_NAME_SIZE = "size";
    public static final String COLUMN_NAME_PACKAGE_METADATA_ID = "package_metadata_id";

    @DatabaseField(generatedId = true, columnName = FileEntry.COLUMN_NAME_ID)
    private Integer id;
    @DatabaseField(columnName = FileEntry.COLUMN_NAME_PATH, canBeNull = false)
    private String path;
    @DatabaseField(columnName = FileEntry.COLUMN_NAME_SIZE, canBeNull = false)
    private Long size;
    @DatabaseField(columnName = FileEntry.COLUMN_NAME_PACKAGE_METADATA_ID, foreign = true)
    private PackageMetadata packageMetadata;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public PackageMetadata getPackageMetadata() {
        return packageMetadata;
    }

    public void setPackageMetadata(PackageMetadata packageMetadata) {
        this.packageMetadata = packageMetadata;
    }
}
